﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Quanly.Master" AutoEventWireup="true" CodeBehind="Kho.aspx.cs" Inherits="BHTT.Khohang.Kho" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register src="~/Khohang/subview/MenuBarKhohang.ascx" tagname="menuBar" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <uc1:menuBar runat="server" ID="MenuBarKho"/>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <center>
        <div style="width: 100%; height: 50px; background-color: #ff6600; padding-left: 15px;">
            <div style="width: 600px; float:left;">
                <asp:LinkButton ID="btnEditSelected" runat="server" Font-Underline="False" 
                                ForeColor="White" Font-Size="11" Font-Bold="True"><img style="border:0px;vertical-align:middle;" alt="" src="../Image/edit.png" />Sửa</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Font-Underline="False" 
                                ForeColor="White" Font-Size="11" Font-Bold="True"><img style="border:0px;vertical-align:middle;" alt="" src="../Image/Add.png" />Thêm</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('Delete all selected customers?')"
                            runat="server" CommandName="DeleteSelected" Font-Underline="False" 
                                ForeColor="White" Font-Size="11" Font-Bold="True"><img style="border:0px;vertical-align:middle;" alt="" src="../Image/delete.png" />Xóa</asp:LinkButton>&nbsp;&nbsp;
                <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid" Font-Underline="False" 
                                ForeColor="White" Font-Size="11" Font-Bold="True"><img style="border:0px;vertical-align:middle;" alt="" src="../Image/refresh.png" />Làm mới dữ liệu</asp:LinkButton>
            </div>
            <div style="width: 200px; height: 50px; padding-top:15px;">
                <ul class="topnav">
                    <li>
                        <a href="#">Danh mục</a>
                        <ul id="subnav">
                            <li><a href="#">Kho cấp 1</a></li>
                            <li><a href="#">Kho cấp 2</a></li>
                            <li><a href="#">Sản phẩm</a></li>
                            <li><a href="#">Nhập kho</a></li>
                            <li><a href="#">Xuất kho</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </center>
    <div id="divDulieu">
        <telerik:RadGrid ID="RadGrid1" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True"
            AllowSorting="True" AllowPaging="True" GridLines="None" runat="server" ShowFooter="True" 
            AllowMultiRowSelection="True" PageSize="7" AllowMultiRowEdit="True" AllowAutomaticInserts="True" 
            OnItemCreated="RadGrid_ItemCreated" OnItemDeleted="RadGrid_ItemDeleted"
            OnItemUpdated="RadGrid_ItemUpdated" OnItemInserted="RadGrid_ItemInserted" 
            ForeColor="Black" Height="100%" Width="100%" AllowFilteringByColumn="True" 
            DataSourceID="SqlDataSource1">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Width="100%" CommandItemDisplay="Top" ClientDataKeyNames="ID"
                            DataKeyNames="ID" AutoGenerateColumns="False" 
                            DataSourceID="SqlDataSource1">
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                </EditFormSettings>
                <CommandItemTemplate></CommandItemTemplate>
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <Columns>
                    <telerik:GridBoundColumn DataField="makho" UniqueName="makho" 
                        HeaderText="Mã kho" SortExpression="makho">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="tenkho" UniqueName="tenkho" 
                        HeaderText="Tên kho" SortExpression="tenkho">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="pptinhgia" UniqueName="pptinhgia" 
                        HeaderText="Phương pháp tính giá" SortExpression="pptinhgia">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />
                 <ClientEvents OnRowSelected="RowSelected" />
            </ClientSettings>
            <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:trathatConnectionString %>" 
                            SelectCommand="SELECT * FROM [kho]">
        </asp:SqlDataSource>
    </div>
</asp:Content>

